package Java.BlackHorse.IO.BufferStream;

import java.io.*;

public class IODemo1 {
    /*
    * 利用 字节缓冲流 一次读取一个字节
    * */
    public static void main(String[] args) throws IOException {
        BufferedInputStream bis = new BufferedInputStream(new FileInputStream("IO\\BufferStream\\a.txt"));
        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("IO\\BufferStream\\b.txt"));
        int b;
        while((b = bis.read()) != -1){
            bos.write(b);
        }
        bos.close();
        bis.close();
    }
}
